package cn.tedu.egmvc1.controller;

import cn.tedu.egmvc1.dto.EmpDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class EmpController {
    @RequestMapping("emp/add")
    @ResponseBody
    public String add(String name,double salary,String job){
        System.out.println("用户信息————"+name+":"+salary+":"+job);
        return "添加成功";
    }
    @RequestMapping("emp/list")
    @ResponseBody
    public String list(){
        return "查询成功";
    }
    @RequestMapping("emp/update")
    @ResponseBody
    public String update(EmpDTO empDTO){
         System.out.println("用户信息————"+empDTO);
         return "修改成功";
    }
    @RequestMapping("emp/delete")
    @ResponseBody
    public String delete(int id){
        System.out.println("用户信息————"+id);
        return "删除成功";
    }
}
